<!DOCTYPE html>
<script src="../../resources/js-test.js"></script>
<style id="testsheet">
    p { color: green }
    .nomatch { color: red }
</style>
<p>This text should be green</p>
<script>
description("Should not be allowed to set selectorText with unknown namespace");

var green = "rgb(0, 128, 0)";
var p = document.querySelector("p");
var sheet = document.querySelector("#testsheet").sheet;
shouldBe("getComputedStyle(p).color", "green");

sheet.cssRules[1].selectorText = "bogus|p";

shouldBeEqualToString("sheet.cssRules[1].selectorText", ".nomatch");
shouldBe("getComputedStyle(p).color", "green");
</script>
